<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>网关信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/sms/smsGateway/">网关信息列表</a></li>
		<li class="active"><a href="${ctx}/sms/smsGateway/form?id=${smsGateway.id}">网关信息<shiro:hasPermission name="sms:smsGateway:edit">${not empty smsGateway.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="sms:smsGateway:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="smsGateway" action="${ctx}/sms/smsGateway/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>

		<div class="control-group">
			<label class="control-label">网关编号：</label>
			<div class="controls">
				<form:input path="gwCode" htmlEscape="false" maxlength="10" class="input-xlarge required"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">应用编号：</label>
			<div class="controls">
				<form:input path="appCode" htmlEscape="false" maxlength="45" class="input-xlarge required"/>
				<span class="help-inline">默认8989</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">网关名称：</label>
			<div class="controls">
				<form:input path="gwName" htmlEscape="false" maxlength="80" class="input-xlarge required"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">备注：</label>
			<div class="controls">
					<form:input path="gwRemark" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">网关状态(0停止1运行中2禁用)：</label>
			<div class="controls">
				<form:select path="gwStatus" class="input-xlarge required">
				<form:options items="${fns:getDictList('gw_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				<span class="help-inline"><font color="red">*</font> </span>
				</form:select>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">网关类型(全网:QW, 移动:YD, 联通:LT, 电信:DX)：</label>
			<div class="controls">
				<form:select path="gwType" class="input-xlarge required">

					<form:options items="${fns:getDictList('phone_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">网关协议(CMPP,SMGP,SGIP,HTTP)：</label>
			<div class="controls">
				<form:select path="gwProto" class="input-xlarge required">

					<form:options items="${fns:getDictList('gw_proto')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">协议版本(30,20)：</label>
			<div class="controls">
				<form:select path="gwProtoVersion" class="input-xlarge required">

					<form:options items="${fns:getDictList('gw_proto_version')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">协议实现类：</label>
			<div class="controls">
				<form:input path="gwProtoClass" htmlEscape="false" maxlength="100" class="input-xlarge "/>
				<span class="help-inline"><font color="red">HTTP</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">协议扩展参数：</label>
			<div class="controls">
				<form:textarea path="gwProtoExtparam" htmlEscape="false" maxlength="800" class="input-xxlarge" rows="3" cols="3"/>
				<span class="help-inline"><font color="red">HTTP</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">服务器IP：</label>
			<div class="controls">
				<form:input path="gwServerIp" htmlEscape="false" maxlength="20" class="input-xlarge "/>
				<span class="help-inline"><font color="red">CMPP</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">服务器端口：</label>
			<div class="controls">
				<form:input path="gwServerPort" htmlEscape="false" maxlength="11" class="input-xlarge "/>
				<span class="help-inline"><font color="red">CMPP</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">本地IP：</label>
			<div class="controls">
				<form:input path="gwLocalIp" htmlEscape="false" maxlength="20" class="input-xlarge "/>
				<span class="help-inline"><font color="red">CMPP</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">本地端口：</label>
			<div class="controls">
				<form:input path="gwLocalPort" htmlEscape="false" maxlength="11" class="input-xlarge "/>
				<span class="help-inline"><font color="red">CMPP</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">网关用户名：</label>
			<div class="controls">
				<form:input path="gwUsername" htmlEscape="false" maxlength="64" class="input-xlarge "/>
				<span class="help-inline"><font color="red">CMPP</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">网关密码：</label>
			<div class="controls">
				<form:input path="gwPassword" htmlEscape="false" maxlength="64" class="input-xlarge "/>
				<span class="help-inline"><font color="red">CMPP</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">网关接入号：</label>
			<div class="controls">
				<form:input path="gwSpNumber" htmlEscape="false" maxlength="20" class="input-xlarge"/>
				<span class="help-inline"><font color="red">CMPP</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">网关企业代码：</label>
			<div class="controls">
				<form:input path="gwCorpId" htmlEscape="false" maxlength="10" class="input-xlarge "/>
				<span class="help-inline"><font color="red">CMPP</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">网关服务代码：</label>
			<div class="controls">
				<form:input path="gwServiceId" htmlEscape="false" maxlength="45" class="input-xlarge "/>
				<span class="help-inline"><font color="red">CMPP</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">状态报告获取模式(0被动1主动)：</label>
			<div class="controls">
				<form:select path="gwReceiveModel" class="input-xlarge required">
					<form:options items="${fns:getDictList('sms_recerive_model')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
				<span class="help-inline"><font color="red">HTTP</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">短信签名模式(0自定义、1强制签名)：</label>
			<div class="controls">
				<form:select path="smsSignModel" class="input-xlarge required">
					<form:options items="${fns:getDictList('sms_sign_model')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">短信签名端（0本地、1网关）：</label>
			<div class="controls">
				<form:select path="smsSignNose" class="input-xlarge required">
					<form:options items="${fns:getDictList('sms_sign_nose')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">是否支持长短信(0支持1不支持)：</label>
			<div class="controls">
				<form:select path="gwLongsms" class="input-xlarge">
					<form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<!--
		<div class="control-group">
			<label class="control-label">一次提交数量：</label>
			<div class="controls">
				<form:input path="gwOnceSubmit" htmlEscape="false" maxlength="11" class="input-xlarge required digits"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		-->
		<div class="control-group">
			<label class="control-label">发送速率：</label>
			<div class="controls">
				<form:input path="gwSendRate" htmlEscape="false" maxlength="11" class="input-xlarge required numberS"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<!--
		<div class="control-group">
			<label class="control-label">接收速率：</label>
			<div class="controls">
				<form:input path="gwReceiveRate" htmlEscape="false" maxlength="11" class="input-xlarge required digits"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">网关连接数：</label>
			<div class="controls">
				<form:input path="gwConnections" htmlEscape="false" maxlength="11" class="input-xlarge required digits"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		-->
		<div class="control-group">
			<label class="control-label">线程获取上行状态1，启动线程,；0，关闭线程：</label>
			<div class="controls">
				<form:select path="gwDeliverStatus" class="input-xlarge required">
					<form:options items="${fns:getDictList('sms_recerive_model')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">发送区域限制：</label>
			<div class="controls">
				<form:input path="sendArea" htmlEscape="false" maxlength="32" class="input-xlarge "/>
			</div>
		</div>
		<!--
		<div class="control-group">
			<label class="control-label">开户地区：</label>
			<div class="controls">
				<form:input path="accountArea" htmlEscape="false" maxlength="32" class="input-xlarge "/>
			</div>
		</div>

		<div class="control-group">
			<label class="control-label">开户运营商：</label>
			<div class="controls">
				<form:input path="accountCarrier" htmlEscape="false" maxlength="32" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">开户运营商联系人：</label>
			<div class="controls">
				<form:input path="accountCarrierContact" htmlEscape="false" maxlength="32" class="input-xlarge "/>
			</div>
		</div>

		<div class="control-group">
			<label class="control-label">单条最大发送字数：</label>
			<div class="controls">
				<form:input path="maxWordNum" htmlEscape="false" maxlength="11" class="input-xlarge  digits"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">超过单条字数不使用网关：</label>
			<div class="controls">
				<form:select path="useGateway" class="input-xlarge ">

					<form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">长短信每条计费长度：</label>
			<div class="controls">
				<form:input path="billLength" htmlEscape="false" maxlength="11" class="input-xlarge  digits"/>
			</div>
		</div>
		-->
		<div class="control-group">
			<label class="control-label">是否需要签名：</label>
			<div class="controls">
				<form:select path="needSign" class="input-xlarge ">

					<form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">签名内容：</label>
			<div class="controls">
				<form:input path="sginCotent" htmlEscape="false" maxlength="32" class="input-xlarge "/>
			</div>
		</div>
		<!--
		<div class="control-group">
			<label class="control-label">网关发送类型：</label>
			<div class="controls">
				<form:input path="gwSendContent" htmlEscape="false" maxlength="32" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">日发送量限制：</label>
			<div class="controls">
				<form:input path="daySendLimit" htmlEscape="false" maxlength="32" class="input-xlarge  digits"/>
			</div>
		</div>

		<div class="control-group">
			<label class="control-label">发送速度限制：</label>
			<div class="controls">
				<form:input path="sendSpeedLimit" htmlEscape="false" maxlength="32" class="input-xlarge  digits"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">用户最少发送条数：</label>
			<div class="controls">
				<form:input path="maxWordNumber" htmlEscape="false" maxlength="32" class="input-xlarge  digits"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">是否支持状态报告：</label>
			<div class="controls">
				<form:select path="supportStateReport" class="input-xlarge ">

					<form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</div>
		</div>
		-->
		<div class="control-group">
			<label class="control-label">优先级：</label>
			<div class="controls">
				<form:input path="priority" htmlEscape="false" maxlength="11" class="input-xlarge  digits"/>
			</div>
		</div>
		<!--
		<div class="control-group">
			<label class="control-label">登录ID：</label>
			<div class="controls">
				<form:input path="loginid" htmlEscape="false" maxlength="32" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">接口实现类：</label>
			<div class="controls">
				<form:input path="interfaceImplclass" htmlEscape="false" maxlength="32" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">发送地址：</label>
			<div class="controls">
				<form:input path="sendAddress" htmlEscape="false" maxlength="32" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">余额地址：</label>
			<div class="controls">
				<form:input path="balanceAddress" htmlEscape="false" maxlength="32" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">状态报告地址：</label>
			<div class="controls">
				<form:input path="stateReportAddress" htmlEscape="false" maxlength="32" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">接收地址：</label>
			<div class="controls">
				<form:input path="receiveAddress" htmlEscape="false" maxlength="32" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">状态获取方式（接收、获取）：</label>
			<div class="controls">
				<form:select path="stateGetmethod" class="input-xlarge ">

					<form:options items="${fns:getDictList('sms_recerive_model')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">是否支持上行：</label>
			<div class="controls">
				<form:select path="supportReply" class="input-xlarge ">

					<form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">上行取间隔时间：</label>
			<div class="controls">
				<form:input path="replyInterval" htmlEscape="false" maxlength="32" class="input-xlarge  digits"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">是否启动状态报告取线程：</label>
			<div class="controls">
				<form:select path="startStatereportThread" class="input-xlarge ">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">状态报告取间隔时间：</label>
			<div class="controls">
				<form:input path="statereportInterval" htmlEscape="false" maxlength="32" class="input-xlarge  digits"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">状态报告更新方式：</label>
			<div class="controls">
				<form:select path="statereportUpdateMethod" class="input-xlarge ">

					<form:options items="${fns:getDictList('sms_recerive_model')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</div>
		</div>
		-->
		<div class="control-group">
			<label class="control-label">一次提交的最大条数：</label>
			<div class="controls">
				<form:input path="maxNumber" htmlEscape="false" maxlength="32" class="input-xlarge  digits"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">一次提交的最少条数：</label>
			<div class="controls">
				<form:input path="minNumber" htmlEscape="false" maxlength="32" class="input-xlarge  digits"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">是否支持群发：</label>
			<div class="controls">
				<form:select path="massFlag" class="input-xlarge ">
					<%--<form:option value="" label=""/>--%>
					<form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</div>

		</div>
		<!--
		<div class="control-group">
			<label class="control-label">每条短信提交后休息多久：</label>
			<div class="controls">
				<form:input path="submitInterval" htmlEscape="false" maxlength="32" class="input-xlarge  digits"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">接口文档：</label>
			<div class="controls">
				<form:input path="interfaceDoc" htmlEscape="false" maxlength="32" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">余额：</label>
			<div class="controls">
				<form:input path="balance" htmlEscape="false" maxlength="32" class="input-xlarge  digits"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">速度：</label>
			<div class="controls">
				<form:input path="speed" htmlEscape="false" maxlength="32" class="input-xlarge  digits"/>
			</div>
		</div>
		-->
		<div class="control-group">
			<label class="control-label">商务：</label>
			<div class="controls">
				<form:input path="business" htmlEscape="false" maxlength="32" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">价格：</label>
			<div class="controls">
				<form:input path="price" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">直连：</label>
			<div class="controls">
				<form:input path="directConnect" htmlEscape="false" maxlength="32" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">物理连接读操作超时时间</label>
			<div class="controls">
				<form:input path="readTimeout" htmlEscape="false" maxlength="32" class="input-xlarge "/>
				<span class="help-inline"><font color="red">cmpp</font> 默认30</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">连接中断时重连间隔时间</label>
			<div class="controls">
				<form:input path="reconnectInterval" htmlEscape="false" maxlength="32" class="input-xlarge "/>
				<span class="help-inline"><font color="red">cmpp</font> 默认5</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">操作超时时间</label>
			<div class="controls">
				<form:input path="transactionTimeout" htmlEscape="false" maxlength="32" class="input-xlarge "/>
				<span class="help-inline"><font color="red">cmpp</font> 默认30</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">心跳信息发送间隔时间</label>
			<div class="controls">
				<form:input path="heartbeatInterval" htmlEscape="false" maxlength="32" class="input-xlarge "/>
				<span class="help-inline"><font color="red">cmpp</font> 默认30</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">需要重连时，连续发出心跳而没有接收到响应的个数</label>
			<div class="controls">
				<form:input path="heartbeatNoresponseout" htmlEscape="false" maxlength="32" class="input-xlarge "/>
				<span class="help-inline"><font color="red">cmpp</font> 默认3</span>
			</div>
		</div>
		<div class="form-actions">
			<shiro:hasPermission name="sms:smsGateway:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
	</form:form>
</body>
</html>